package com.lmuse.xmr.foodspotting.ui.welcome;

/**
 * Created by chenan on 18-1-18.
 */

public class WelcomePresenterImpl implements Contract.WelcomePresenter {

    private Contract.WelcomeView welcomeView;
    private android.os.Handler handler;

    public WelcomePresenterImpl(Contract.WelcomeView welcomeView) {
        this.welcomeView = welcomeView;
        handler = new android.os.Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                WelcomePresenterImpl.this.welcomeView.onFinish();
            }
        }, 2000);
    }

    @Override
    public void onDetach() {
        welcomeView = null;
        handler.removeCallbacksAndMessages(null);
    }
}
